package com.example.neteasemusic.welcome


import android.view.LayoutInflater
import androidx.lifecycle.lifecycleScope
import androidx.viewbinding.ViewBinding
import com.example.lib_data.base.fragment.BaseFragment
import com.example.lib_data.utils.navigateTo
import com.example.neteasemusic.R
import com.example.neteasemusic.databinding.FragmentWelcomeBinding
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch

class WelcomeFragment : BaseFragment() {
    override fun getLayoutBinding(inflater: LayoutInflater): ViewBinding? {
        return FragmentWelcomeBinding.inflate(inflater)
    }

    override fun initData() {
        requireActivity().supportFragmentManager
    }

    override fun onResume() {
        super.onResume()
        lifecycleScope.launch {
            delay(1500)
            navigateTo(R.id.welcomeFragmentContainer,AdvertisementFragment())
        }
    }


}